<template>
  <div>
    <el-card class="box-card">
      <template #header>
        <span>数据字典管理</span>
      </template>
      <el-row :gutter="20">
        <el-col :span="3">
          <el-tree
            :default-expanded-keys="['产品相关']"
            node-key="label"
            :props="props"
            :load="loadNode"
            lazy
            @node-click="nodeClick"
          />
        </el-col>
        <el-col :span="21">
          <div ref="allBtn" v-hasPermission="'qm:set:dictionary:do'" class="m-b-10">
            <m-all-btn :button-list="overallBtn" />
          </div>
          <m-table v-loading="dataGrid.loading" :height="dataGrid.height" :list="dataGrid.data" :columns="dataGrid.columns" :pagination="dataGrid.pagination">
            <template #action="scope">
              <m-all-btn :button-list="dataGrid.btnList" :scope="scope" />
            </template>
          </m-table>
        </el-col>
      </el-row>
    </el-card>

    <m-modal-form
      width="319px"
      :title="editForm.formType !== 'add' ? editForm.title[0] :editForm.title[1]"
      :form-attrs="editForm.formAttrs"
      :visible.sync="editForm.visible"
      :form-type="editForm.formType"
      :options="editForm.options"
      @save="save"
      @get-model="(form)=>editForm.form = form"
    />
  </div>
</template>

<script>
// 混入 minxin 文件夹下面所有的js文件
const files = require.context("./mixins", false, /\.js$/);
const minxins = [];
files.keys().forEach(key => {
  minxins.push(files(key).default || files(key));
});

export default {
  mixins: [...minxins],
  data() {
    return {

    };
  },
  created() {
    this.keyupSubmitSearch = false;
  },
  methods: {

  }
};
</script>

<style scoped lang="less">

</style>
